const babelCore = require('@babel/core')

const code = `
  let obj = {
    say() {
      return "Hello";
    },
  };
  
  let obj2 = {
    say() {
      return super.say() + "World!";
    },
  };
`
const result = babelCore.transformSync(code, {
  plugins: ["@babel/plugin-transform-object-super"]
})

console.log(result.code);